package com.youkeyi.ddy.cloud.common.api.basic.hr.employee.employee;

import com.youkeyi.ddy.cloud.common.api.basic.hr.employee.employee.dto.HrEmployeeListCloudDto;
import com.youkeyi.ddy.cloud.common.api.basic.hr.employee.employee.param.HrEmployeeCreateCloudParam;
import com.youkeyi.ddy.cloud.common.api.basic.hr.employee.employee.param.HrEmployeeDeleteCloudParam;
import com.youkeyi.ddy.cloud.common.api.basic.hr.employee.employee.param.HrEmployeeQueryCloudParam;
import com.youkeyi.ddy.cloud.common.api.basic.hr.employee.employee.param.HrEmployeeUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * HrEmployeeCloudService
 *
 * @author  liuxiawang
 * @Date 2024/2/19 2:31 PM
 * @location shenzhen.china
 */
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-BASIC-HR", fallback = HrEmployeeCloudServiceFallback.class)
@RequestMapping("/hr/employee")
public interface HrEmployeeCloudService {

    /**
     * 查询员工列表.
     *
     * @param param the param
     * @return the employee list cloud dto
     */
    @PostMapping(value = "/query")
    public abstract HrEmployeeListCloudDto query(@RequestBody HrEmployeeQueryCloudParam param);

    /**
     * 查询近期过生日的员工.
     *
     * @param param the param
     * @return the employee list cloud dto
     */
    @PostMapping(value = "/query/for/birthday")
    public abstract HrEmployeeListCloudDto queryForBirthday(@RequestBody HrEmployeeQueryCloudParam param);

    /**
     * 新增员工.
     *
     * @param param the param
     * @return the response content
     */
    @PostMapping(value = "/create")
    public abstract ResponseContent create(@RequestBody HrEmployeeCreateCloudParam param);

    /**
     * 编辑员工.
     *
     * @param param the param
     * @return the response content
     */
    @PostMapping(value = "/update")
    public abstract ResponseContent update(@RequestBody HrEmployeeUpdateCloudParam param);

    /**
     * 删除员工.
     *
     * @param param the param
     * @return the response content
     */
    @PostMapping(value = "/delete")
    public abstract ResponseContent delete(@RequestBody HrEmployeeDeleteCloudParam param);
}
